<template>
  <div class="dl-card">
    <div class="dl-card-title">{{ router.meta.title }}</div>
    <div class="dl-card-wrapper">
      <div class="dl-card-conteent">
        <slot name="card-content" />
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
import { useRoute } from 'vue-router';

const router = useRoute();
</script>
<style lang="scss" scoped>
.dl-card {
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  .dl-card-title {
    width: 100%;
    padding: 8px 20px;
    background-color: #fff;
    font-size: 16px;
  }
  .dl-card-wrapper {
    flex: 1;
    box-shadow: 0 0 8px 8px rgba(0, 0, 0, 0.1) inset;
    overflow: hidden;
  }
  .dl-card-conteent {
    width: calc(100% - 24px);
    height: calc(100% - 24px);
    margin: 12px;
    background-color: #fff;
    border-radius: 5px;
    overflow-y: auto;
    padding: 15px;
  }
}
</style>
